<template>
  <div class="post-success common-page">
    <div class="success-content">
      <van-icon name="checked" />
      <span>恭喜宝贝！</span>
      <span>你的地址已收到，我们会在3-5个工作日安排送出</span>
    </div>
    <div class="button-box">
      <van-button
        type="primary"
        round
        @click="enterToHome"
      >再抽一个</van-button>
      <van-button
        type="default"
        round
        @click="enterToMyBindBox"
      >查看盲盒</van-button>
    </div>
  </div>
</template>

<script>
import { Button, Icon } from "vant";
import Share from "./mixin/share";
export default {
  name: "PostDone",
  components: {
    [Button.name]: Button,
    [Icon.name]: Icon,
  },
  mixins: [Share],
  data() {
    return {};
  },
  created() {
    this.setShare();
  },
  mounted() {},
  methods: {
    enterToHome() {
      // let backlen = history.length - 1;
      // history.go(-backlen);
      this.$router.replace({
        path: "/home",
      });
    },
    enterToMyBindBox() {
      this.$router.replace({
        path: "/myBlindBox",
      });
    },
  },
};
</script>

<style lang="less" scoped>
@import "../common/css/common.less";
.post-success {
  padding: 0;
  .success-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 436px;
    background: #ffffff;
    .van-icon {
      font-size: 108px;
      color: #1677ff;
    }
    span:nth-child(2) {
      font-size: 36px;
      color: #333333;
      line-height: 50px;
      margin-top: 48px;
      margin-bottom: 16px;
    }
    span:last-child {
      font-size: 26px;
      color: #999999;
      line-height: 37px;
    }
  }
}
.post-success.common-page {
  .button-box {
    position: static !important;
    height: auto;
    background: none;
    .van-button {
      margin-top: 20px;
    }
    .van-button--default {
      background: #ffffff;
      color: #222222;
    }
  }
}
</style>
